
module.exports = {
  sayHello: function () {
    console.log('Hello from utils!');
  },
  api_dev_url: function () {
    return 'http://localhost:8080';
  },
  api_pro_url: function () {
    return 'https://api.dingvip.com';
  },
  key: function () {
    return "zjD/vtVeH03tfHKFy36d4J0Ltp";
  },
  appid: function () {
    return 'tt157e63c38a75506b01';
  },
  byteid: function () {
    return '30916048083';
    // 抖音IM客服(官方推荐)
  },
  generateSerialNumbe: function () {
    // 获取当前日期和时间
    const today = new Date();
    const year = today.getFullYear();
    const month = String(today.getMonth() + 1).padStart(2, '0'); // 月份从0开始，需要加1
    const day = String(today.getDate()).padStart(2, '0');
    const hours = String(today.getHours()).padStart(2, '0');
    const minutes = String(today.getMinutes()).padStart(2, '0');
    const seconds = String(today.getSeconds()).padStart(2, '0');

    // 格式化为YYYYMMDDHHMMSS
    const datePart = `${year}${month}${day}${hours}${minutes}${seconds}`;

    // 生成6位随机码
    const randomPart = Math.random().toString(36).substr(2, 6);

    // 返回序列号
    return `${datePart}${randomPart}`;
  }
};
